#!/bin/csh -f

#**************************************************************************
#**
#**    Copyright (c) 1995-1997 by ABKGroup, UCLA VLSI CAD Laboratory,
#**    UCLA Computer Science Department, Los Angeles, CA 90095-1596 USA,
#**    and by the Regents of the University of California.
#**    All rights reserved.
#**
#**    No portion of this file may be used, copied, or transmitted for
#**    any purpose, including any research or commercial purpose,
#**    without the express written consent of Professor Andrew B. Kahng,
#**    UCLA Computer Science Department, 3713 Boelter Hall, Los Angeles,
#**    CA 90095-1596 USA.   Any copy made of this file must include this
#**    notice.    ABKGroup and the Regents of the University of California
#**    retain title to all copies of this file and/or its compiled
#**    derivatives.
#**
#**************************************************************************/

set DIFF=/usr/bin/diff
set WC=/usr/bin/wc
set PROG=PlaceEvalsTest
set OPT0="-net TESTS/dwarf1.netD -are TESTS/dwarf1.are -blk TESTS/dwarf1.blk -pl TESTS/dwarf1.pl"
set OPT1="-net TESTS/p2+.netD -are TESTS/p2+.are -blk TESTS/p2+.blk -pl TESTS/p2+.pl"

/bin/rm -f seeds.* >& /dev/null

# cp TESTS/seeds.in seeds.in

echo "------------  Running test 0(dwarf1)..." >  new.out
echo "Running test 0(dwarf1)..."
${PROG}0.exe  $OPT0  -placeEval BBoxPlEval >>new.out
${PROG}0.exe  $OPT0  -placeEval BBoxWCheng >>new.out
${PROG}0.exe  $OPT0  -placeEval BBoxWRSMT >>new.out
${PROG}0.exe  $OPT0  -placeEval HBBox >>new.out
${PROG}0.exe  $OPT0  -placeEval HBBoxWCheng >>new.out
${PROG}0.exe  $OPT0  -placeEval HBBoxWRSMT >>new.out
${PROG}0.exe  $OPT0  -placeEval HBBox0 >>new.out
${PROG}0.exe  $OPT0  -placeEval HBBox0wCheng >>new.out
${PROG}0.exe  $OPT0  -placeEval HBBox0wRSMT >>new.out
${PROG}0.exe  $OPT0  -placeEval HBBoxN >>new.out

echo "------------  Running test 0(p2+)..." >> new.out
echo "Running test 0(p2+)..."
${PROG}0.exe  $OPT1  -placeEval BBoxPlEval >>new.out
${PROG}0.exe  $OPT1  -placeEval BBoxWCheng >>new.out
${PROG}0.exe  $OPT1  -placeEval BBoxWRSMT >>new.out
${PROG}0.exe  $OPT1  -placeEval HBBox >>new.out
${PROG}0.exe  $OPT1  -placeEval HBBoxWCheng >>new.out
${PROG}0.exe  $OPT1  -placeEval HBBoxWRSMT >>new.out
${PROG}0.exe  $OPT1  -placeEval HBBox0 >>new.out
${PROG}0.exe  $OPT1  -placeEval HBBox0wCheng >>new.out
${PROG}0.exe  $OPT1  -placeEval HBBox0wRSMT >>new.out
${PROG}0.exe  $OPT1  -placeEval HBBoxN >>new.out

echo "------------  Running test 1..." >> new.out
echo Running test 1...
${PROG}1.exe  $OPT0  -placeEval BBoxPlEval >>new.out
${PROG}1.exe  $OPT0  -placeEval BBoxWCheng >>new.out
${PROG}1.exe  $OPT0  -placeEval BBoxWRSMT >>new.out
${PROG}1.exe  $OPT0  -placeEval HBBox >>new.out
${PROG}1.exe  $OPT0  -placeEval HBBoxWCheng >>new.out
${PROG}1.exe  $OPT0  -placeEval HBBoxWRSMT >>new.out
${PROG}1.exe  $OPT0  -placeEval HBBox0 >>new.out
${PROG}1.exe  $OPT0  -placeEval HBBox0wCheng >>new.out
${PROG}1.exe  $OPT0  -placeEval HBBox0wRSMT >>new.out
${PROG}1.exe  $OPT0  -placeEval HBBoxN >>new.out

egrep -v "(Created|sec|User|Platform|Memory)" new.out > newout.notime
egrep -v "(Created|sec|User|Platform|Memory)" expected.out > expectedout.notime
$DIFF newout.notime expectedout.notime > diffs.notime
 
echo " "
echo Differences from precomputed results
$WC diffs.notime

/bin/rm -f seeds.* t1.* >& /dev/null

